package com.tanker.common.utils; 
/** 
 * @comments
 * @author zg 
 * @version 2013年10月11日 
 */
public enum ErrorCode {
	//系统级
	SUCCESS("000000","success"), 
	//输入校验
	FAILED("000001","操作失败！"),
	INPUT_ERROR("000002","输入错误"),
	SYS_ERROR("999999","系统异常"),
	TOKEN_INVALID("100001","没有登录或登录失效，请重新登录"),//。
	LOGIN_FAILED("200002","登录失败,用户名/密码不匹配"),	
	RENTER_IDENTITY_NO("100002","身份认证没通过"),//
	RENT_CAR_DEPOSIT_NO_PAY("100003","租车押金没支付"),//
	
	//车辆的
	CAR_IS_NOT("110001","车辆不存在"),//
	CAR_IS_RESERVE_ORTHER("110001","该车已经被别人预定"),// other
	CAR_IS_UUNOPENED("110003", "车门锁不能打开"),

	//订单
	RESERVE_TRABS_IS_EXIST("120001","有预定中的订单"),//Reserve
	DOING_TRABS_IS_EXIST("120002","有进行中的订单"),//exist
	NO_PAY_TRABS_IS_EXIST("120003","有未支付的订单"),//exist
	TRANS_IS_NO_EXIST("120004","订单不存在"),//exist
	ORDER_OPENDOOR_ERROR("120005", "订单暂时不可开始"),
	RESERVE_TRANS_IS_NO_EXIST("120005","订单不是预订中不能取消"),//
	TRANS_CANCEL_IS_LIMIT("120006","订单取消次数超限"),//Cancel
	TRANS_IS_NOT_RESERVE_NOT_DOING("120007","订单不是进行中或者预定中不能开门"),//Cancel
	TRANS_IS_NOT_DOING("120009","订单不是进行中不能操作"),//Cancel
	TRANS_IS_NOT_RETURN("120010","订单没还车不能操作"),//Cancel
	TRANS_IS_PAY("120011","订单已经支付"),//Cancel
	
	//还车
	RETURN_CAR_IS_NOT_RAIL("13001", "请在指定范围内还车"),
	LON_OR_LAT_NOT_USE("13002", "不可用的经纬度"),
	RETURN_CAR_UPLOAD_IMG_ERROR("13003", "还车时上传图片出错"),
	
	//上传
	FILE_INS_NOT("19001", "请选择上传图片"),
	UPLOAD_IMG_ERROR("19002", "上传图片出错"),
	//depositAmt
	DEPOSIT_IS_EXIST("19003", "押金已支付"),
	//押金
	DEPOSIT_IS_NOT_DEPOSIT_IS_EXIST("20001", "押金不存在"),
	
	TRANS_MODIFICATION_ORDER_STATUS_ABATEMENTV45("999926","很抱歉，该订单暂时无法修改，请15分钟后再试"),
	
	
	
	PARAM_FAILED("E1001", "参数校验失败"),
	DEPOSIT_FAILED("E1002", "押金退款失败"),
	DEPOSIT_BLOCKED_FAILED("E1003", "冻结押金失败"),
	PROECESS_TRANS("E1004", "处理订单失败"),
	ACTRECORD_FAILED("E1006", "押金退款失败"),
	SENDEMAIL_FAILED("E1007", "提交审核失败"),
	SESSION_FAILED("E1008", "请先登录"),
	OPENDOOR_FAILED("E1009", "开门失败"),
	CLOSEDOOR_FAILED("E1010", "锁门失败"),
	CONTROL_FAILED("E1011", "远程控制失败"),
	OPENDOOR_RECOVER_FAILED("E1012", "远程开门供电失败"),
	CLOSEDOOR_OUTAGE_FAILED("E1013", "远程关门断电失败"),
	SEEK_FAILED("E1014", "远程关门断电失败"),
	SWSTATUS_FAILED("E1015", "车辆下线失败"),
	PAYAMT_FAILED("E1005", "请先审批");
	
	private String code;
	private String text;
	
	private ErrorCode(String code, String text) {
        this.code = code;   
        this.text = text;   
    }

	public String getCode() {
		return code;
	}

	private void setCode(String code) {
		this.code = code;
	}
	
	public String getText() {
		return text;
	}
	
	private void setText(String text) {  //throws CloneNotSupportedException 
		
		this.text = text;
//		System.out.println(this.getClass().getName());
//		System.out.println(this.clone());
//		return ErrorCode.SUCCESS;
	} 

	/*public Object setText(String text) {  //throws CloneNotSupportedException 
		
		this.text = text;
//		System.out.println(this.getClass().getName());
//		System.out.println(this.clone());
		return ErrorCode.SUCCESS;
	} */
	

}
